﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ALDIOrganizer
{
    public class NameIDPair
    {
        public string Name { get; private set; }

        public long ID { get; private set; }

        protected NameIDPair()
        {
        }

        public NameIDPair(string pName,
            Int64 pID)
        {
            Name = pName;
            ID = pID;
        }

        public static List<NameIDPair> AsDataSource(Int64[] pIDs)
        {
            var result = new List<NameIDPair>();

            foreach (int id in pIDs)
            {
                var name = SQLiteAccess.GetEmployeeFullName(id);
                var another = new NameIDPair(name, id);
                result.Add(another);
            }

            return result;
        }
    }
}
